package com.fashion.model;

import com.fashion.utils.UrlKeyword;
import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;

import javax.persistence.*;
import java.io.Serializable;
import java.util.Date;

/**
 * User: gnyk
 * Date: 12-12-30
 */

@Entity
@Table(name = "TagWord")
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
public class TagWord implements Serializable {
    private String id;
    private String word;
    private Date createDate;
    private UrlKeyword urlKeyword;

    @Id
    @Column
    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    @Column
    public String getWord() {
        return word;
    }

    public void setWord(String word) {
        this.word = word;
    }

    @Column
    public Date getCreateDate() {
        return createDate;
    }

    public void setCreateDate(Date createDate) {
        this.createDate = createDate;
    }

    @Transient
    public UrlKeyword getUrlKeyword() {
        return urlKeyword;
    }

    public void setUrlKeyword(UrlKeyword urlKeyword) {
        this.urlKeyword = urlKeyword;
    }
}
